package com.zking.web.lp;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zking.dao.domain.Post;
import com.zking.service.lp.PostBasedao;


@Controller
public class PostController {
	
	@Autowired
	private PostBasedao postBasedao;
	
	@RequestMapping(value = "/Posts")
	public String Posts(Post post) {
		System.out.println("进来了");
		System.out.println(post);
		int i = postBasedao.addPosts(post);
		if(i!=0) {
			return "index06";
		}else {
			return "create";
		}
	}
}
